package org.wsiz.vro.repository;

import org.springframework.stereotype.Service;
import org.wsiz.vro.domain.Film;

/**
 * Helper class to create transient entities instance for testing purposes.
 * Simple properties are pre-filled with random values.
 */
@Service
public class FilmGenerator {

	/**
	 * Returns a new Film instance filled with random values.
	 */
	public Film getFilm() {
		Film film = new Film();

		// simple attributes follows
		film.setTitle("a");
		film.setYear(1);
		film.setDescription("Lorem ipsum");
		film.setDuration(1000);
		// mandatory relation
		return film;
	}
}